<template>
  <!-- 搜索 -->
  <database-search />
  <!-- 列表 -->
  <database-list />
  <!-- 新增数据源弹窗 -->
  <a-drawer v-model:visible="databaseDrawer" destroy-on-close width="500px" :title="null" :footer="null">
    <adding-database />
  </a-drawer>
</template>

<script lang="ts" setup>
  import DatabaseSearch from './components/DatabaseSearch.vue';
  import DatabaseList from './components/DatabaseList.vue';
  import AddingDatabase from './components/AddingDatabase.vue';
  import { addingDataSourcesHooks } from '@/hooks/DatabaseManagementHooks/addingDataSourcesHooks';
  import { getDataBaseListHooks } from '@/hooks/DatabaseManagementHooks/getDataBaseListHooks';
  const { databaseDrawer } = addingDataSourcesHooks();
  const { getList } = getDataBaseListHooks();
  getList();
</script>

<style lang="less" scoped>
  .search {
    margin-bottom: 20px;
  }
</style>
